home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_10
/
8n10086b
< prev
next >
Wrap
Text File
|
1990-07-21
|
531b
|
29 lines
*******Listing 3
/* Write to a printer -- the correct way */
#include <stdio.h>
function()
{
FILE *file_printer; /* pointer to a file */
int x, y, z;
x = 5;
y = y;
z = x + y;
/* open the printer */
file_printer = fopen ("PRN", "w");
/* print the line */
fprintf (file_printer, "The answer is %10d", z);
/* close the printer */
fclose (file_printer);
}
*********